﻿@model OSBLE.Models.Courses.CourseUser
@using OSBLE.Models
@using OSBLE.Models.Courses
@using OSBLE.Models.Assignments

@{
    ViewBag.Title = "Edit";
    CourseUser client = ViewBag.ActiveCourseUser as CourseUser;
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

        @Html.HiddenFor(model => model.UserProfileID)
        @Html.HiddenFor(model => model.AbstractCourseID)
        @Html.HiddenFor(model => Model.ID);

        <div class="editor-label">
            @Html.LabelFor(model => model.UserProfileID, "Name")
            @Helpers.CreateToolTip(ToolTips.RosterUserName) 
        </div>
        <div class="editor-label">
            <input type="text" disabled="disabled" value="@Model.UserProfile.FirstName @Model.UserProfile.LastName" />
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AbstractRoleID, "Course Role")
            @Helpers.CreateToolTip(ToolTips.RosterRole) 
        </div>
        <div class="editor-field">
            @Html.DropDownList("AbstractRoleID", String.Empty)
            @Html.ValidationMessageFor(model => model.AbstractRoleID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Section)
            @Helpers.CreateToolTip(ToolTips.RosterSection) 
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Section, new { size = 3 })
            @Html.ValidationMessageFor(model => model.Section)
        </div>

        <p>
            <input type="submit" value="Save User" />
        </p>

}

<div>
    @Html.ActionLink("Back to Users", "Index")
</div>
